//
//  UIImage+ex.swift
//  WZApp
//
//  Created by evol on 2018/7/9.
//  Copyright © 2018年 evol. All rights reserved.
//

import UIKit

extension UIImage {
    class func imageFromCache(_ key: String) -> UIImage? {
        let manager = FileManager.default
        let imagePath = key.imageCachePath
        let fileExist = manager.fileExists(atPath: imagePath)
        if fileExist {
            return UIImage(contentsOfFile: imagePath)
        }
        return nil
    }
}
